// source --> https://www.cosmanelektriciteit.be/wp-content/themes/cosman/js/modernizr.js /* Modernizr 2.7.1 (Custom Build) | MIT & BSD * Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-flexboxlegacy-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-smil-svg-svgclippaths-touch-webgl-shiv-cssclasses-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load */ ;window.Modernizr=function(a,b,c){function C(a){j.cssText=a}function D(a,b){return C(n.join(a+";")+(b||""))}function E(a,b){return typeof a===b}function F(a,b){return!!~(""+a).indexOf(b)}function G(a,b){for(var d in a){var e=a[d];if(!F(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function H(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:E(f,"function")?f.bind(d||b):f}return!1}function I(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+p.join(d+" ")+d).split(" ");return E(b,"string")||E(b,"undefined")?G(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),H(e,b,c))}function J(){e.input=function(c){for(var d=0,e=c.length;d',a,""].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},z=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=E(e[d],"function"),E(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),A={}.hasOwnProperty,B;!E(A,"undefined")&&!E(A.call,"undefined")?B=function(a,b){return A.call(a,b)}:B=function(a,b){return b in a&&E(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=w.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(w.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(w.call(arguments)))};return e}),s.flexbox=function(){return I("flexWrap")},s.flexboxlegacy=function(){return I("boxDirection")},s.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},s.canvastext=function(){return!!e.canvas&&!!E(b.createElement("canvas").getContext("2d").fillText,"function")},s.webgl=function(){return!!a.WebGLRenderingContext},s.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:y(["@media (",n.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},s.geolocation=function(){return"geolocation"in navigator},s.postmessage=function(){return!!a.postMessage},s.websqldatabase=function(){return!!a.openDatabase},s.indexedDB=function(){return!!I("indexedDB",a)},s.hashchange=function(){return z("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},s.history=function(){return!!a.history&&!!history.pushState},s.draganddrop=function(){var a=b.createElement("div");return"draggable"in a||"ondragstart"in a&&"ondrop"in a},s.websockets=function(){return"WebSocket"in a||"MozWebSocket"in a},s.rgba=function(){return C("background-color:rgba(150,255,150,.5)"),F(j.backgroundColor,"rgba")},s.hsla=function(){return C("background-color:hsla(120,40%,100%,.5)"),F(j.backgroundColor,"rgba")||F(j.backgroundColor,"hsla")},s.multiplebgs=function(){return C("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},s.backgroundsize=function(){return I("backgroundSize")},s.borderimage=function(){return I("borderImage")},s.borderradius=function(){return I("borderRadius")},s.boxshadow=function(){return I("boxShadow")},s.textshadow=function(){return b.createElement("div").style.textShadow===""},s.opacity=function(){return D("opacity:.55"),/^0.55$/.test(j.opacity)},s.cssanimations=function(){return I("animationName")},s.csscolumns=function(){return I("columnCount")},s.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return C((a+"-webkit- ".split(" ").join(b+a)+n.join(c+a)).slice(0,-a.length)),F(j.backgroundImage,"gradient")},s.cssreflections=function(){return I("boxReflect")},s.csstransforms=function(){return!!I("transform")},s.csstransforms3d=function(){var a=!!I("perspective");return a&&"webkitPerspective"in g.style&&y("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},s.csstransitions=function(){return I("transition")},s.fontface=function(){var a;return y('@font-face {font-family:"font";src:url("https://")}',function(c,d){var e=b.getElementById("smodernizr"),f=e.sheet||e.styleSheet,g=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=/src/i.test(g)&&g.indexOf(d.split(" ")[0])===0}),a},s.generatedcontent=function(){var a;return y(["#",h,"{font:0/0 a}#",h,':after{content:"',l,'";visibility:hidden;font:3px/1 a}'].join(""),function(b){a=b.offsetHeight>=3}),a},s.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c},s.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(d){}return c},s.localstorage=function(){try{return localStorage.setItem(h,h),localStorage.removeItem(h),!0}catch(a){return!1}},s.sessionstorage=function(){try{return sessionStorage.setItem(h,h),sessionStorage.removeItem(h),!0}catch(a){return!1}},s.webworkers=function(){return!!a.Worker},s.applicationcache=function(){return!!a.applicationCache},s.svg=function(){return!!b.createElementNS&&!!b.createElementNS(r.svg,"svg").createSVGRect},s.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="",(a.firstChild&&a.firstChild.namespaceURI)==r.svg},s.smil=function(){return!!b.createElementNS&&/SVGAnimate/.test(m.call(b.createElementNS(r.svg,"animate")))},s.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(m.call(b.createElementNS(r.svg,"clipPath")))};for(var K in s)B(s,K)&&(x=K.toLowerCase(),e[x]=s[K](),v.push((e[x]?"":"no-")+x));return e.input||J(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)B(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},C(""),i=k=null,function(a,b){function l(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function m(){var a=s.elements;return typeof a=="string"?a.split(" "):a}function n(a){var b=j[a[h]];return b||(b={},i++,a[h]=i,j[i]=b),b}function o(a,c,d){c||(c=b);if(k)return c.createElement(a);d||(d=n(c));var g;return d.cache[a]?g=d.cache[a].cloneNode():f.test(a)?g=(d.cache[a]=d.createElem(a)).cloneNode():g=d.createElem(a),g.canHaveChildren&&!e.test(a)&&!g.tagUrn?d.frag.appendChild(g):g}function p(a,c){a||(a=b);if(k)return a.createDocumentFragment();c=c||n(a);var d=c.frag.cloneNode(),e=0,f=m(),g=f.length;for(;e",g="hidden"in a,k=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){g=!0,k=!0}})();var s={elements:d.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:c,shivCSS:d.shivCSS!==!1,supportsUnknownElements:k,shivMethods:d.shivMethods!==!1,type:"default",shivDocument:r,createElement:o,createDocumentFragment:p};a.html5=s,r(b)}(this,b),e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.hasEvent=z,e.testProp=function(a){return G([a])},e.testAllProps=I,e.testStyles=y,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+v.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f https://www.cosmanelektriciteit.be/wp-content/themes/cosman/js/jquery.waypoints.js // Generated by CoffeeScript 1.6.2 /* jQuery Waypoints - v2.0.3 Copyright (c) 2011-2013 Caleb Troughton Dual licensed under the MIT license and GPL license. https://github.com/imakewebthings/jquery-waypoints/blob/master/licenses.txt */ (function(){var t=[].indexOf||function(t){for(var e=0,n=this.length;e=0;s={horizontal:{},vertical:{}};f=1;a={};u="waypoints-context-id";p="resize.waypoints";y="scroll.waypoints";v=1;w="waypoints-waypoint-ids";g="waypoint";m="waypoints";o=function(){function t(t){var e=this;this.$element=t;this.element=t[0];this.didResize=false;this.didScroll=false;this.id="context"+f++;this.oldScroll={x:t.scrollLeft(),y:t.scrollTop()};this.waypoints={horizontal:{},vertical:{}};t.data(u,this.id);a[this.id]=this;t.bind(y,function(){var t;if(!(e.didScroll||c)){e.didScroll=true;t=function(){e.doScroll();return e.didScroll=false};return r.setTimeout(t,n[m].settings.scrollThrottle)}});t.bind(p,function(){var t;if(!e.didResize){e.didResize=true;t=function(){n[m]("refresh");return e.didResize=false};return r.setTimeout(t,n[m].settings.resizeThrottle)}})}t.prototype.doScroll=function(){var t,e=this;t={horizontal:{newScroll:this.$element.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.$element.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};if(c&&(!t.vertical.oldScroll||!t.vertical.newScroll)){n[m]("refresh")}n.each(t,function(t,r){var i,o,l;l=[];o=r.newScroll>r.oldScroll;i=o?r.forward:r.backward;n.each(e.waypoints[t],function(t,e){var n,i;if(r.oldScroll<(n=e.offset)&&n<=r.newScroll){return l.push(e)}else if(r.newScroll<(i=e.offset)&&i<=r.oldScroll){return l.push(e)}});l.sort(function(t,e){return t.offset-e.offset});if(!o){l.reverse()}return n.each(l,function(t,e){if(e.options.continuous||t===l.length-1){return e.trigger([i])}})});return this.oldScroll={x:t.horizontal.newScroll,y:t.vertical.newScroll}};t.prototype.refresh=function(){var t,e,r,i=this;r=n.isWindow(this.element);e=this.$element.offset();this.doScroll();t={horizontal:{contextOffset:r?0:e.left,contextScroll:r?0:this.oldScroll.x,contextDimension:this.$element.width(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:r?0:e.top,contextScroll:r?0:this.oldScroll.y,contextDimension:r?n[m]("viewportHeight"):this.$element.height(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};return n.each(t,function(t,e){return n.each(i.waypoints[t],function(t,r){var i,o,l,s,f;i=r.options.offset;l=r.offset;o=n.isWindow(r.element)?0:r.$element.offset()[e.offsetProp];if(n.isFunction(i)){i=i.apply(r.element)}else if(typeof i==="string"){i=parseFloat(i);if(r.options.offset.indexOf("%")>-1){i=Math.ceil(e.contextDimension*i/100)}}r.offset=o-e.contextOffset+e.contextScroll-i;if(r.options.onlyOnScroll&&l!=null||!r.enabled){return}if(l!==null&&l<(s=e.oldScroll)&&s<=r.offset){return r.trigger([e.backward])}else if(l!==null&&l>(f=e.oldScroll)&&f>=r.offset){return r.trigger([e.forward])}else if(l===null&&e.oldScroll>=r.offset){return r.trigger([e.forward])}})})};t.prototype.checkEmpty=function(){if(n.isEmptyObject(this.waypoints.horizontal)&&n.isEmptyObject(this.waypoints.vertical)){this.$element.unbind([p,y].join(" "));return delete a[this.id]}};return t}();l=function(){function t(t,e,r){var i,o;r=n.extend({},n.fn[g].defaults,r);if(r.offset==="bottom-in-view"){r.offset=function(){var t;t=n[m]("viewportHeight");if(!n.isWindow(e.element)){t=e.$element.height()}return t-n(this).outerHeight()}}this.$element=t;this.element=t[0];this.axis=r.horizontal?"horizontal":"vertical";this.callback=r.handler;this.context=e;this.enabled=r.enabled;this.id="waypoints"+v++;this.offset=null;this.options=r;e.waypoints[this.axis][this.id]=this;s[this.axis][this.id]=this;i=(o=t.data(w))!=null?o:[];i.push(this.id);t.data(w,i)}t.prototype.trigger=function(t){if(!this.enabled){return}if(this.callback!=null){this.callback.apply(this.element,t)}if(this.options.triggerOnce){return this.destroy()}};t.prototype.disable=function(){return this.enabled=false};t.prototype.enable=function(){this.context.refresh();return this.enabled=true};t.prototype.destroy=function(){delete s[this.axis][this.id];delete this.context.waypoints[this.axis][this.id];return this.context.checkEmpty()};t.getWaypointsByElement=function(t){var e,r;r=n(t).data(w);if(!r){return[]}e=n.extend({},s.horizontal,s.vertical);return n.map(r,function(t){return e[t]})};return t}();d={init:function(t,e){var r;if(e==null){e={}}if((r=e.handler)==null){e.handler=t}this.each(function(){var t,r,i,s;t=n(this);i=(s=e.context)!=null?s:n.fn[g].defaults.context;if(!n.isWindow(i)){i=t.closest(i)}i=n(i);r=a[i.data(u)];if(!r){r=new o(i)}return new l(t,r,e)});n[m]("refresh");return this},disable:function(){return d._invoke(this,"disable")},enable:function(){return d._invoke(this,"enable")},destroy:function(){return d._invoke(this,"destroy")},prev:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(e>0){return t.push(n[e-1])}})},next:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(et.oldScroll.y})},left:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset<=t.oldScroll.x})},right:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset>t.oldScroll.x})},enable:function(){return h._invoke("enable")},disable:function(){return h._invoke("disable")},destroy:function(){return h._invoke("destroy")},extendFn:function(t,e){return d[t]=e},_invoke:function(t){var e;e=n.extend({},s.vertical,s.horizontal);return n.each(e,function(e,n){n[t]();return true})},_filter:function(t,e,r){var i,o;i=a[n(t).data(u)];if(!i){return[]}o=[];n.each(i.waypoints[e],function(t,e){if(r(i,e)){return o.push(e)}});o.sort(function(t,e){return t.offset-e.offset});return n.map(o,function(t){return t.element})}};n[m]=function(){var t,n;n=arguments[0],t=2<=arguments.length?e.call(arguments,1):[];if(h[n]){return h[n].apply(null,t)}else{return h.aggregate.call(null,n)}};n[m].settings={resizeThrottle:100,scrollThrottle:30};return i.load(function(){return n[m]("refresh")})})}).call(this); // source --> https://www.cosmanelektriciteit.be/wp-content/themes/cosman/js/lightslider.js (function ($, undefined) { 'use strict'; var defaults = { item: 3, autoWidth: false, slideMove: 1, slideMargin: 10, addClass: '', mode: 'slide', useCSS: true, cssEasing: 'ease', //'cubic-bezier(0.25, 0, 0.25, 1)', easing: 'linear', //'for jquery animation',// speed: 400, //ms' auto: false, loop: false, slideEndAnimation: true, pause: 2000, keyPress: false, controls: true, prevHtml: '', nextHtml: '', rtl: false, adaptiveHeight: false, vertical: false, verticalHeight: 500, vThumbWidth: 100, thumbItem: 10, pager: true, gallery: false, galleryMargin: 5, thumbMargin: 5, currentPagerPosition: 'middle', enableTouch: true, enableDrag: true, freeMove: true, swipeThreshold: 40, responsive: [], /* jshint ignore:start */ onBeforeStart: function ($el) {}, onSliderLoad: function ($el) {}, onBeforeSlide: function ($el, scene) {}, onAfterSlide: function ($el, scene) {}, onBeforeNextSlide: function ($el, scene) {}, onBeforePrevSlide: function ($el, scene) {} /* jshint ignore:end */ }; $.fn.lightSlider = function (options) { if (this.length === 0) { return this; } if (this.length > 1) { this.each(function () { $(this).lightSlider(options); }); return this; } var plugin = {}, settings = $.extend(true, {}, defaults, options), settingsTemp = {}, $el = this; plugin.$el = this; if (settings.mode === 'fade') { settings.vertical = false; } var $children = $el.children(), windowW = $(window).width(), breakpoint = null, resposiveObj = null, length = 0, w = 0, on = false, elSize = 0, $slide = '', scene = 0, property = (settings.vertical === true) ? 'height' : 'width', gutter = (settings.vertical === true) ? 'margin-bottom' : 'margin-right', slideValue = 0, pagerWidth = 0, slideWidth = 0, thumbWidth = 0, interval = null, isTouch = ('ontouchstart' in document.documentElement); var refresh = {}; refresh.chbreakpoint = function () { windowW = $(window).width(); if (settings.responsive.length) { var item; if (settings.autoWidth === false) { item = settings.item; } if (windowW < settings.responsive[0].breakpoint) { for (var i = 0; i < settings.responsive.length; i++) { if (windowW < settings.responsive[i].breakpoint) { breakpoint = settings.responsive[i].breakpoint; resposiveObj = settings.responsive[i]; } } } if (typeof resposiveObj !== 'undefined' && resposiveObj !== null) { for (var j in resposiveObj.settings) { if (resposiveObj.settings.hasOwnProperty(j)) { if (typeof settingsTemp[j] === 'undefined' || settingsTemp[j] === null) { settingsTemp[j] = settings[j]; } settings[j] = resposiveObj.settings[j]; } } } if (!$.isEmptyObject(settingsTemp) && windowW > settings.responsive[0].breakpoint) { for (var k in settingsTemp) { if (settingsTemp.hasOwnProperty(k)) { settings[k] = settingsTemp[k]; } } } if (settings.autoWidth === false) { if (slideValue > 0 && slideWidth > 0) { if (item !== settings.item) { scene = Math.round(slideValue / ((slideWidth + settings.slideMargin) * settings.slideMove)); } } } } }; refresh.calSW = function () { if (settings.autoWidth === false) { slideWidth = (elSize - ((settings.item * (settings.slideMargin)) - settings.slideMargin)) / settings.item; } }; refresh.calWidth = function (cln) { var ln = cln === true ? $slide.find('.lslide').length : $children.length; if (settings.autoWidth === false) { w = ln * (slideWidth + settings.slideMargin); } else { w = 0; for (var i = 0; i < ln; i++) { w += (parseInt($children.eq(i).width()) + settings.slideMargin); } } return w; }; plugin = { doCss: function () { var support = function () { var transition = ['transition', 'MozTransition', 'WebkitTransition', 'OTransition', 'msTransition', 'KhtmlTransition']; var root = document.documentElement; for (var i = 0; i < transition.length; i++) { if (transition[i] in root.style) { return true; } } }; if (settings.useCSS && support()) { return true; } return false; }, keyPress: function () { if (settings.keyPress) { $(document).on('keyup.lightslider', function (e) { if (!$(':focus').is('input, textarea')) { if (e.preventDefault) { e.preventDefault(); } else { e.returnValue = false; } if (e.keyCode === 37) { $el.goToPrevSlide(); clearInterval(interval); } else if (e.keyCode === 39) { $el.goToNextSlide(); clearInterval(interval); } } }); } }, controls: function () { if (settings.controls) { $el.after(''); if (!settings.autoWidth) { if (length <= settings.item) { $slide.find('.lSAction').hide(); } } else { if (refresh.calWidth(false) < elSize) { $slide.find('.lSAction').hide(); } } $slide.find('.lSAction a').on('click', function (e) { if (e.preventDefault) { e.preventDefault(); } else { e.returnValue = false; } if ($(this).attr('class') === 'lSPrev') { $el.goToPrevSlide(); } else { $el.goToNextSlide(); } clearInterval(interval); return false; }); } }, initialStyle: function () { var $this = this; if (settings.mode === 'fade') { settings.autoWidth = false; settings.slideEndAnimation = false; } if (settings.auto) { settings.slideEndAnimation = false; } if (settings.autoWidth) { settings.slideMove = 1; settings.item = 1; } if (settings.loop) { settings.slideMove = 1; settings.freeMove = false; } settings.onBeforeStart.call(this, $el); refresh.chbreakpoint(); $el.addClass('lightSlider').wrap('
'); $slide = $el.parent('.lSSlideWrapper'); if (settings.rtl === true) { $slide.parent().addClass('lSrtl'); } if (settings.vertical) { $slide.parent().addClass('vertical'); elSize = settings.verticalHeight; $slide.css('height', elSize + 'px'); } else { elSize = $el.outerWidth(); } $children.addClass('lslide'); if (settings.loop === true && settings.mode === 'slide') { refresh.calSW(); refresh.clone = function () { if (refresh.calWidth(true) > elSize) { /**/ var tWr = 0, tI = 0; for (var k = 0; k < $children.length; k++) { tWr += (parseInt($el.find('.lslide').eq(k).width()) + settings.slideMargin); tI++; if (tWr >= (elSize + settings.slideMargin)) { break; } } var tItem = settings.autoWidth === true ? tI : settings.item; /**/ if (tItem < $el.find('.clone.left').length) { for (var i = 0; i < $el.find('.clone.left').length - tItem; i++) { $children.eq(i).remove(); } } if (tItem < $el.find('.clone.right').length) { for (var j = $children.length - 1; j > ($children.length - 1 - $el.find('.clone.right').length); j--) { scene--; $children.eq(j).remove(); } } /**/ for (var n = $el.find('.clone.right').length; n < tItem; n++) { $el.find('.lslide').eq(n).clone().removeClass('lslide').addClass('clone right').appendTo($el); scene++; } for (var m = $el.find('.lslide').length - $el.find('.clone.left').length; m > ($el.find('.lslide').length - tItem); m--) { $el.find('.lslide').eq(m - 1).clone().removeClass('lslide').addClass('clone left').prependTo($el); } $children = $el.children(); } else { if ($children.hasClass('clone')) { $el.find('.clone').remove(); $this.move($el, 0); } } }; refresh.clone(); } refresh.sSW = function () { length = $children.length; if (settings.rtl === true && settings.vertical === false) { gutter = 'margin-left'; } if (settings.autoWidth === false) { $children.css(property, slideWidth + 'px'); } $children.css(gutter, settings.slideMargin + 'px'); w = refresh.calWidth(false); $el.css(property, w + 'px'); if (settings.loop === true && settings.mode === 'slide') { if (on === false) { scene = $el.find('.clone.left').length; } } }; refresh.calL = function () { $children = $el.children(); length = $children.length; }; if (this.doCss()) { $slide.addClass('usingCss'); } refresh.calL(); if (settings.mode === 'slide') { refresh.calSW(); refresh.sSW(); if (settings.loop === true) { slideValue = $this.slideValue(); this.move($el, slideValue); } if (settings.vertical === false) { this.setHeight($el, false); } } else { this.setHeight($el, true); $el.addClass('lSFade'); if (!this.doCss()) { $children.fadeOut(0); $children.eq(scene).fadeIn(0); } } if (settings.loop === true && settings.mode === 'slide') { $children.eq(scene).addClass('active'); } else { $children.first().addClass('active'); } }, pager: function () { var $this = this; refresh.createPager = function () { thumbWidth = (elSize - ((settings.thumbItem * (settings.thumbMargin)) - settings.thumbMargin)) / settings.thumbItem; var $children = $slide.find('.lslide'); var length = $slide.find('.lslide').length; var i = 0, pagers = '', v = 0; for (i = 0; i < length; i++) { if (settings.mode === 'slide') { // calculate scene * slide value if (!settings.autoWidth) { v = i * ((slideWidth + settings.slideMargin) * settings.slideMove); } else { v += ((parseInt($children.eq(i).width()) + settings.slideMargin) * settings.slideMove); } } var thumb = $children.eq(i * settings.slideMove).attr('data-thumb'); if (settings.gallery === true) { pagers += '
  • '; } else { pagers += '
  • ' + (i + 1) + '
  • '; } if (settings.mode === 'slide') { if ((v) >= w - elSize - settings.slideMargin) { i = i + 1; var minPgr = 2; if (settings.autoWidth) { pagers += '
  • ' + (i + 1) + '
  • '; minPgr = 1; } if (i < minPgr) { pagers = null; $slide.parent().addClass('noPager'); } else { $slide.parent().removeClass('noPager'); } break; } } } var $cSouter = $slide.parent(); $cSouter.find('.lSPager').html(pagers); if (settings.gallery === true) { if (settings.vertical === true) { // set Gallery thumbnail width $cSouter.find('.lSPager').css('width', settings.vThumbWidth + 'px'); } pagerWidth = (i * (settings.thumbMargin + thumbWidth)) + 0.5; $cSouter.find('.lSPager').css({ property: pagerWidth + 'px', 'transition-duration': settings.speed + 'ms' }); if (settings.vertical === true) { $slide.parent().css('padding-right', (settings.vThumbWidth + settings.galleryMargin) + 'px'); } $cSouter.find('.lSPager').css(property, pagerWidth + 'px'); } var $pager = $cSouter.find('.lSPager').find('li'); $pager.first().addClass('active'); $pager.on('click', function () { if (settings.loop === true && settings.mode === 'slide') { scene = scene + ($pager.index(this) - $cSouter.find('.lSPager').find('li.active').index()); } else { scene = $pager.index(this); } $el.mode(false); if (settings.gallery === true) { $this.slideThumb(); } clearInterval(interval); return false; }); }; if (settings.pager) { var cl = 'lSpg'; if (settings.gallery) { cl = 'lSGallery'; } $slide.after(''); var gMargin = (settings.vertical) ? 'margin-left' : 'margin-top'; $slide.parent().find('.lSPager').css(gMargin, settings.galleryMargin + 'px'); refresh.createPager(); } setTimeout(function () { refresh.init(); }, 0); }, setHeight: function (ob, fade) { var obj = null, $this = this; if (settings.loop) { obj = ob.children('.lslide ').first(); } else { obj = ob.children().first(); } var setCss = function () { var tH = obj.outerHeight(), tP = 0, tHT = tH; if (fade) { tH = 0; tP = ((tHT) * 100) / elSize; } ob.css({ 'height': tH + 'px', 'padding-bottom': tP + '%' }); }; setCss(); if (obj.find('img').length) { if ( obj.find('img')[0].complete) { setCss(); if (!interval) { $this.auto(); } }else{ obj.find('img').load(function () { setTimeout(function () { setCss(); if (!interval) { $this.auto(); } }, 100); }); } }else{ if (!interval) { $this.auto(); } } }, active: function (ob, t) { if (this.doCss() && settings.mode === 'fade') { $slide.addClass('on'); } var sc = 0; if (scene * settings.slideMove < length) { ob.removeClass('active'); if (!this.doCss() && settings.mode === 'fade' && t === false) { ob.fadeOut(settings.speed); } if (t === true) { sc = scene; } else { sc = scene * settings.slideMove; } //t === true ? sc = scene : sc = scene * settings.slideMove; var l, nl; if (t === true) { l = ob.length; nl = l - 1; if (sc + 1 >= l) { sc = nl; } } if (settings.loop === true && settings.mode === 'slide') { //t === true ? sc = scene - $el.find('.clone.left').length : sc = scene * settings.slideMove; if (t === true) { sc = scene - $el.find('.clone.left').length; } else { sc = scene * settings.slideMove; } if (t === true) { l = ob.length; nl = l - 1; if (sc + 1 === l) { sc = nl; } else if (sc + 1 > l) { sc = 0; } } } if (!this.doCss() && settings.mode === 'fade' && t === false) { ob.eq(sc).fadeIn(settings.speed); } ob.eq(sc).addClass('active'); } else { ob.removeClass('active'); ob.eq(ob.length - 1).addClass('active'); if (!this.doCss() && settings.mode === 'fade' && t === false) { ob.fadeOut(settings.speed); ob.eq(sc).fadeIn(settings.speed); } } }, move: function (ob, v) { if (settings.rtl === true) { v = -v; } if (this.doCss()) { if (settings.vertical === true) { ob.css({ 'transform': 'translate3d(0px, ' + (-v) + 'px, 0px)', '-webkit-transform': 'translate3d(0px, ' + (-v) + 'px, 0px)' }); } else { ob.css({ 'transform': 'translate3d(' + (-v) + 'px, 0px, 0px)', '-webkit-transform': 'translate3d(' + (-v) + 'px, 0px, 0px)', }); } } else { if (settings.vertical === true) { ob.css('position', 'relative').animate({ top: -v + 'px' }, settings.speed, settings.easing); } else { ob.css('position', 'relative').animate({ left: -v + 'px' }, settings.speed, settings.easing); } } var $thumb = $slide.parent().find('.lSPager').find('li'); this.active($thumb, true); }, fade: function () { this.active($children, false); var $thumb = $slide.parent().find('.lSPager').find('li'); this.active($thumb, true); }, slide: function () { var $this = this; refresh.calSlide = function () { if (w > elSize) { slideValue = $this.slideValue(); $this.active($children, false); if ((slideValue) > w - elSize - settings.slideMargin) { slideValue = w - elSize - settings.slideMargin; } else if (slideValue < 0) { slideValue = 0; } $this.move($el, slideValue); if (settings.loop === true && settings.mode === 'slide') { if (scene >= (length - ($el.find('.clone.left').length / settings.slideMove))) { $this.resetSlide($el.find('.clone.left').length); } if (scene === 0) { $this.resetSlide($slide.find('.lslide').length); } } } }; refresh.calSlide(); }, resetSlide: function (s) { var $this = this; $slide.find('.lSAction a').addClass('disabled'); setTimeout(function () { scene = s; $slide.css('transition-duration', '0ms'); slideValue = $this.slideValue(); $this.active($children, false); plugin.move($el, slideValue); setTimeout(function () { $slide.css('transition-duration', settings.speed + 'ms'); $slide.find('.lSAction a').removeClass('disabled'); }, 50); }, settings.speed + 100); }, slideValue: function () { var _sV = 0; if (settings.autoWidth === false) { _sV = scene * ((slideWidth + settings.slideMargin) * settings.slideMove); } else { _sV = 0; for (var i = 0; i < scene; i++) { _sV += (parseInt($children.eq(i).width()) + settings.slideMargin); } } return _sV; }, slideThumb: function () { var position; switch (settings.currentPagerPosition) { case 'left': position = 0; break; case 'middle': position = (elSize / 2) - (thumbWidth / 2); break; case 'right': position = elSize - thumbWidth; } var sc = scene - $el.find('.clone.left').length; var $pager = $slide.parent().find('.lSPager'); if (settings.mode === 'slide' && settings.loop === true) { if (sc >= $pager.children().length) { sc = 0; } else if (sc < 0) { sc = $pager.children().length; } } var thumbSlide = sc * ((thumbWidth + settings.thumbMargin)) - (position); if ((thumbSlide + elSize) > pagerWidth) { thumbSlide = pagerWidth - elSize - settings.thumbMargin; } if (thumbSlide < 0) { thumbSlide = 0; } this.move($pager, thumbSlide); }, auto: function () { if (settings.auto) { interval = setInterval(function () { $el.goToNextSlide(); }, settings.pause); } }, touchMove: function (endCoords, startCoords) { $slide.css('transition-duration', '0ms'); if (settings.mode === 'slide') { var distance = endCoords - startCoords; var swipeVal = slideValue - distance; if ((swipeVal) >= w - elSize - settings.slideMargin) { if (settings.freeMove === false) { swipeVal = w - elSize - settings.slideMargin; } else { var swipeValT = w - elSize - settings.slideMargin; swipeVal = swipeValT + ((swipeVal - swipeValT) / 5); } } else if (swipeVal < 0) { if (settings.freeMove === false) { swipeVal = 0; } else { swipeVal = swipeVal / 5; } } this.move($el, swipeVal); } }, touchEnd: function (distance) { $slide.css('transition-duration', settings.speed + 'ms'); clearInterval(interval); if (settings.mode === 'slide') { var mxVal = false; var _next = true; slideValue = slideValue - distance; if ((slideValue) > w - elSize - settings.slideMargin) { slideValue = w - elSize - settings.slideMargin; if (settings.autoWidth === false) { mxVal = true; } } else if (slideValue < 0) { slideValue = 0; } var gC = function (next) { var ad = 0; if (!mxVal) { if (next) { ad = 1; } } if (!settings.autoWidth) { var num = slideValue / ((slideWidth + settings.slideMargin) * settings.slideMove); scene = parseInt(num) + ad; if (slideValue >= (w - elSize - settings.slideMargin)) { if (num % 1 !== 0) { scene++; } } } else { var tW = 0; for (var i = 0; i < $children.length; i++) { tW += (parseInt($children.eq(i).width()) + settings.slideMargin); scene = i + ad; if (tW >= slideValue) { break; } } } }; if (distance >= settings.swipeThreshold) { gC(false); _next = false; } else if (distance <= -settings.swipeThreshold) { gC(true); _next = false; } $el.mode(_next); this.slideThumb(); } else { if (distance >= settings.swipeThreshold) { $el.goToPrevSlide(); } else if (distance <= -settings.swipeThreshold) { $el.goToNextSlide(); } } }, enableDrag: function () { var $this = this; if (!isTouch) { var startCoords = 0, endCoords = 0, isDraging = false; $slide.find('.lightSlider').addClass('lsGrab'); $slide.on('mousedown', function (e) { if (w < elSize) { if (w !== 0) { return false; } } if ($(e.target).attr('class') !== ('lSPrev') && $(e.target).attr('class') !== ('lSNext')) { startCoords = (settings.vertical === true) ? e.pageY : e.pageX; isDraging = true; if (e.preventDefault) { e.preventDefault(); } else { e.returnValue = false; } // ** Fix for webkit cursor issue https://code.google.com/p/chromium/issues/detail?id=26723 $slide.scrollLeft += 1; $slide.scrollLeft -= 1; // * $slide.find('.lightSlider').removeClass('lsGrab').addClass('lsGrabbing'); clearInterval(interval); } }); $(window).on('mousemove', function (e) { if (isDraging) { endCoords = (settings.vertical === true) ? e.pageY : e.pageX; $this.touchMove(endCoords, startCoords); } }); $(window).on('mouseup', function (e) { if (isDraging) { $slide.find('.lightSlider').removeClass('lsGrabbing').addClass('lsGrab'); isDraging = false; endCoords = (settings.vertical === true) ? e.pageY : e.pageX; var distance = endCoords - startCoords; if (Math.abs(distance) >= settings.swipeThreshold) { $(window).on('click.ls', function (e) { if (e.preventDefault) { e.preventDefault(); } else { e.returnValue = false; } e.stopImmediatePropagation(); e.stopPropagation(); $(window).off('click.ls'); }); } $this.touchEnd(distance); } }); } }, enableTouch: function () { var $this = this; if (isTouch) { var startCoords = {}, endCoords = {}; $slide.on('touchstart', function (e) { endCoords = e.originalEvent.targetTouches[0]; startCoords.pageX = e.originalEvent.targetTouches[0].pageX; startCoords.pageY = e.originalEvent.targetTouches[0].pageY; clearInterval(interval); }); $slide.on('touchmove', function (e) { if (w < elSize) { if (w !== 0) { return false; } } var orig = e.originalEvent; endCoords = orig.targetTouches[0]; var xMovement = Math.abs(endCoords.pageX - startCoords.pageX); var yMovement = Math.abs(endCoords.pageY - startCoords.pageY); if (settings.vertical === true) { if ((yMovement * 3) > xMovement) { e.preventDefault(); } $this.touchMove(endCoords.pageY, startCoords.pageY); } else { if ((xMovement * 3) > yMovement) { e.preventDefault(); } $this.touchMove(endCoords.pageX, startCoords.pageX); } }); $slide.on('touchend', function () { if (w < elSize) { if (w !== 0) { return false; } } var distance; if (settings.vertical === true) { distance = endCoords.pageY - startCoords.pageY; } else { distance = endCoords.pageX - startCoords.pageX; } $this.touchEnd(distance); }); } }, build: function () { var $this = this; $this.initialStyle(); if (this.doCss()) { if (settings.enableTouch === true) { $this.enableTouch(); } if (settings.enableDrag === true) { $this.enableDrag(); } } $this.pager(); $this.controls(); $this.keyPress(); } }; plugin.build(); refresh.init = function () { refresh.chbreakpoint(); if (settings.vertical === true) { if (settings.item > 1) { elSize = settings.verticalHeight; } else { elSize = $children.outerHeight(); } $slide.css('height', elSize + 'px'); } else { elSize = $slide.outerWidth(); } if (settings.loop === true && settings.mode === 'slide') { refresh.clone(); } refresh.calL(); if (settings.mode === 'slide') { $el.removeClass('lSSlide'); } if (settings.mode === 'slide') { refresh.calSW(); refresh.sSW(); } setTimeout(function () { if (settings.mode === 'slide') { $el.addClass('lSSlide'); } }, 1000); if (settings.pager) { refresh.createPager(); } if (settings.adaptiveHeight === true && settings.vertical === false) { $el.css('height', $children.eq(scene).outerHeight(true)); } if (settings.adaptiveHeight === false) { if (settings.mode === 'slide') { if (settings.vertical === false) { plugin.setHeight($el, false); }else{ plugin.auto(); } } else { plugin.setHeight($el, true); } } if (settings.gallery === true) { plugin.slideThumb(); } if (settings.mode === 'slide') { plugin.slide(); } if (settings.autoWidth === false) { if ($children.length <= settings.item) { $slide.find('.lSAction').hide(); } else { $slide.find('.lSAction').show(); } } else { if ((refresh.calWidth(false) < elSize) && (w !== 0)) { $slide.find('.lSAction').hide(); } else { $slide.find('.lSAction').show(); } } }; $el.goToPrevSlide = function () { if (scene > 0) { settings.onBeforePrevSlide.call(this, $el, scene); scene--; $el.mode(false); if (settings.gallery === true) { plugin.slideThumb(); } } else { if (settings.loop === true) { settings.onBeforePrevSlide.call(this, $el, scene); if (settings.mode === 'fade') { var l = (length - 1); scene = parseInt(l / settings.slideMove); } $el.mode(false); if (settings.gallery === true) { plugin.slideThumb(); } } else if (settings.slideEndAnimation === true) { $el.addClass('leftEnd'); setTimeout(function () { $el.removeClass('leftEnd'); }, 400); } } }; $el.goToNextSlide = function () { var nextI = true; if (settings.mode === 'slide') { var _slideValue = plugin.slideValue(); nextI = _slideValue < w - elSize - settings.slideMargin; } if (((scene * settings.slideMove) < length - settings.slideMove) && nextI) { settings.onBeforeNextSlide.call(this, $el, scene); scene++; $el.mode(false); if (settings.gallery === true) { plugin.slideThumb(); } } else { if (settings.loop === true) { settings.onBeforeNextSlide.call(this, $el, scene); scene = 0; $el.mode(false); if (settings.gallery === true) { plugin.slideThumb(); } } else if (settings.slideEndAnimation === true) { $el.addClass('rightEnd'); setTimeout(function () { $el.removeClass('rightEnd'); }, 400); } } }; $el.mode = function (_touch) { if (settings.adaptiveHeight === true && settings.vertical === false) { $el.css('height', $children.eq(scene).outerHeight(true)); } if (on === false) { if (settings.mode === 'slide') { if (plugin.doCss()) { $el.addClass('lSSlide'); if (settings.speed !== '') { $slide.css('transition-duration', settings.speed + 'ms'); } if (settings.cssEasing !== '') { $slide.css('transition-timing-function', settings.cssEasing); } } } else { if (plugin.doCss()) { if (settings.speed !== '') { $el.css('transition-duration', settings.speed + 'ms'); } if (settings.cssEasing !== '') { $el.css('transition-timing-function', settings.cssEasing); } } } } if (!_touch) { settings.onBeforeSlide.call(this, $el, scene); } if (settings.mode === 'slide') { plugin.slide(); } else { plugin.fade(); } setTimeout(function () { if (!_touch) { settings.onAfterSlide.call(this, $el, scene); } }, settings.speed); on = true; }; $el.play = function () { clearInterval(interval); $el.goToNextSlide(); interval = setInterval(function () { $el.goToNextSlide(); }, settings.pause); }; $el.pause = function () { clearInterval(interval); }; $el.refresh = function () { refresh.init(); }; $el.getCurrentSlideCount = function () { var sc = scene; if (settings.loop) { var ln = $slide.find('.lslide').length, cl = $el.find('.clone.left').length; if (scene <= cl - 1) { sc = ln + (scene - cl); } else if (scene >= (ln + cl)) { sc = scene - ln - cl; } else { sc = scene - cl; } } return sc + 1; }; $el.getTotalSlideCount = function () { return $slide.find('.lslide').length; }; $el.goToSlide = function (s) { if (settings.loop) { scene = (s + $el.find('.clone.left').length - 1); } else { scene = s; } $el.mode(false); if (settings.gallery === true) { plugin.slideThumb(); } }; setTimeout(function () { settings.onSliderLoad.call(this, $el); }, 10); $(window).on('resize orientationchange', function (e) { setTimeout(function () { if (e.preventDefault) { e.preventDefault(); } else { e.returnValue = false; } refresh.init(); }, 200); }); return this; }; }(jQuery)); // source --> https://www.cosmanelektriciteit.be/wp-content/themes/cosman/js/jquery.easing.1.3.js /* * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ * * Uses the built in easing capabilities added In jQuery 1.1 * to offer multiple easing options * * TERMS OF USE - jQuery Easing * * Open source under the BSD License. * * Copyright © 2008 George McGinley Smith * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this list of * conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list * of conditions and the following disclaimer in the documentation and/or other materials * provided with the distribution. * * Neither the name of the author nor the names of contributors may be used to endorse * or promote products derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * */ // t: current time, b: begInnIng value, c: change In value, d: duration jQuery.easing['jswing'] = jQuery.easing['swing']; jQuery.extend( jQuery.easing, { def: 'easeOutQuad', swing: function (x, t, b, c, d) { //alert(jQuery.easing.default); return jQuery.easing[jQuery.easing.def](x, t, b, c, d); }, easeInQuad: function (x, t, b, c, d) { return c*(t/=d)*t + b; }, easeOutQuad: function (x, t, b, c, d) { return -c *(t/=d)*(t-2) + b; }, easeInOutQuad: function (x, t, b, c, d) { if ((t/=d/2) < 1) return c/2*t*t + b; return -c/2 * ((--t)*(t-2) - 1) + b; }, easeInCubic: function (x, t, b, c, d) { return c*(t/=d)*t*t + b; }, easeOutCubic: function (x, t, b, c, d) { return c*((t=t/d-1)*t*t + 1) + b; }, easeInOutCubic: function (x, t, b, c, d) { if ((t/=d/2) < 1) return c/2*t*t*t + b; return c/2*((t-=2)*t*t + 2) + b; }, easeInQuart: function (x, t, b, c, d) { return c*(t/=d)*t*t*t + b; }, easeOutQuart: function (x, t, b, c, d) { return -c * ((t=t/d-1)*t*t*t - 1) + b; }, easeInOutQuart: function (x, t, b, c, d) { if ((t/=d/2) < 1) return c/2*t*t*t*t + b; return -c/2 * ((t-=2)*t*t*t - 2) + b; }, easeInQuint: function (x, t, b, c, d) { return c*(t/=d)*t*t*t*t + b; }, easeOutQuint: function (x, t, b, c, d) { return c*((t=t/d-1)*t*t*t*t + 1) + b; }, easeInOutQuint: function (x, t, b, c, d) { if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b; return c/2*((t-=2)*t*t*t*t + 2) + b; }, easeInSine: function (x, t, b, c, d) { return -c * Math.cos(t/d * (Math.PI/2)) + c + b; }, easeOutSine: function (x, t, b, c, d) { return c * Math.sin(t/d * (Math.PI/2)) + b; }, easeInOutSine: function (x, t, b, c, d) { return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b; }, easeInExpo: function (x, t, b, c, d) { return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b; }, easeOutExpo: function (x, t, b, c, d) { return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b; }, easeInOutExpo: function (x, t, b, c, d) { if (t==0) return b; if (t==d) return b+c; if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b; return c/2 * (-Math.pow(2, -10 * --t) + 2) + b; }, easeInCirc: function (x, t, b, c, d) { return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b; }, easeOutCirc: function (x, t, b, c, d) { return c * Math.sqrt(1 - (t=t/d-1)*t) + b; }, easeInOutCirc: function (x, t, b, c, d) { if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b; return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b; }, easeInElastic: function (x, t, b, c, d) { var s=1.70158;var p=0;var a=c; if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; if (a < Math.abs(c)) { a=c; var s=p/4; } else var s = p/(2*Math.PI) * Math.asin (c/a); return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; }, easeOutElastic: function (x, t, b, c, d) { var s=1.70158;var p=0;var a=c; if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; if (a < Math.abs(c)) { a=c; var s=p/4; } else var s = p/(2*Math.PI) * Math.asin (c/a); return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b; }, easeInOutElastic: function (x, t, b, c, d) { var s=1.70158;var p=0;var a=c; if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5); if (a < Math.abs(c)) { a=c; var s=p/4; } else var s = p/(2*Math.PI) * Math.asin (c/a); if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b; }, easeInBack: function (x, t, b, c, d, s) { if (s == undefined) s = 1.70158; return c*(t/=d)*t*((s+1)*t - s) + b; }, easeOutBack: function (x, t, b, c, d, s) { if (s == undefined) s = 1.70158; return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; }, easeInOutBack: function (x, t, b, c, d, s) { if (s == undefined) s = 1.70158; if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; }, easeInBounce: function (x, t, b, c, d) { return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b; }, easeOutBounce: function (x, t, b, c, d) { if ((t/=d) < (1/2.75)) { return c*(7.5625*t*t) + b; } else if (t < (2/2.75)) { return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; } else if (t < (2.5/2.75)) { return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; } else { return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; } }, easeInOutBounce: function (x, t, b, c, d) { if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b; return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b; } }); /* * * TERMS OF USE - EASING EQUATIONS * * Open source under the BSD License. * * Copyright © 2001 Robert Penner * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this list of * conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list * of conditions and the following disclaimer in the documentation and/or other materials * provided with the distribution. * * Neither the name of the author nor the names of contributors may be used to endorse * or promote products derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * */; // source --> https://www.cosmanelektriciteit.be/wp-content/themes/cosman/js/jquery.lavalamp.min.js /** * Lava Lamp * http://lavalamp.magicmediamuse.com/ * * Author * Richard Hung * http://www.magicmediamuse.com/ * * Version * 1.0.7 * * Copyright (c) 2014 Richard Hung. * * License * Lava Lamp by Richard Hung is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported License. * http://creativecommons.org/licenses/by-nc/3.0/deed.en_US */ (function($) { var methods = { init : function(settings) { // Set default parameters var defaultSettings = { easing: 'swing', // Easing transition duration: 700, // Duration of animation margins: false, // Whether or not to include margins setOnClick: false, // Whether or not to set the new active element on click activeObj: '.active', // Selector for the active element autoUpdate: false, // Update every interval updateTime: 100, // Time between update checks enableHover: true, // lavalamp moves with hover instead of click delayOn: 0, // Delay time on hover delayOff: 0 // Delay time off hover }; // End options // Override default options var settings = $.extend({}, defaultSettings, settings); return this.each(function(){ // Get the options var easing = settings.easing; var duration = settings.duration; var margins = settings.margins; var setOnClick = settings.setOnClick; var activeObj = settings.activeObj; var autoUpdate = settings.autoUpdate; var updateTime = settings.updateTime; var enableHover = settings.enableHover; var delayOn = settings.delayOn; var delayOff = settings.delayOff; // Set variables var list = $(this); var items = list.children(); var active = list.children(activeObj); // Check if active element exists if (active.length == 0) { active = items.eq(0); } // Set variables to object list.data({ active: active, isAnim: false, settings: settings }); // Create basic structure list.addClass('lavalamp').css({ position: 'relative' }); var obj = $('
    ').prependTo(list).css({ position: 'absolute' }); items.addClass('lavalamp-item').css({ zIndex: 5, position: 'relative' }); var w = active.outerWidth(margins); var h = active.outerHeight(margins); var t = active.position().top; var l = active.position().left; var mt = active.css('marginTop'); var ml = active.css('marginLeft'); // Add margins to calculations if(!margins) { ml = parseInt(ml); mt = parseInt(mt); l = l + ml; t = t + mt; } obj.css({ width: w, height: h, top: t, left: l }); var onHover = false; lavalampEnter = function() { var des = $(this); onHover = true; // delay and animate setTimeout(function() { if (onHover) { list.lavalamp('anim',des); } },delayOn); }; // end mousenter lavalampLeave = function() { var des = list.data('active'); onHover = false; // delay and animate setTimeout(function() { if (!onHover) { list.lavalamp('anim',des); } },delayOff); }; // end mouseleave // items.hover(enter, leave); if (enableHover) { list.on('mouseenter','.lavalamp-item',lavalampEnter); list.on('mouseleave','.lavalamp-item',lavalampLeave); } if (setOnClick) { items.click(function() { active = $(this); list.data('active',active).lavalamp('update'); }); } // End set on click if (autoUpdate) { var updateInterval = setInterval(function() { var isAnim = list.data('isAnim'); if (onHover == false && isAnim == false) { list.lavalamp('update'); } }, updateTime); // End setinterval list.data('updateInterval',updateInterval); } // End auto update }); // End object loop }, // End init destroy : function() { return this.each(function(){ var list = $(this); var settings = list.data('settings'); var items = list.children('.lavalamp-item'); var enableHover = settings.enableHover; var autoUpdate = settings.autoUpdate; // Unbind the plugin effect if (enableHover) { list.off('mouseenter', '.lavalamp-item', lavalampEnter); list.off('mouseleave', '.lavalamp-item', lavalampLeave); } // Remove CSS list.removeClass('lavalamp'); items.removeClass('lavalamp-item'); // remove auto update if (autoUpdate) { var updateInterval = list.data('updateInterval'); clearInterval(updateInterval); } // End auto update // Remove the lavalamp object list.children('.lavalamp-object').remove(); // Remove data from wrapper list.removeData(); }); }, // End destroy update : function () { return this.each(function(){ var list = $(this); var items = list.children(':not(.lavalamp-object)'); var active = list.data('active'); var obj = list.children('.lavalamp-object'); // reset list objects items.addClass('lavalamp-item').css({ zIndex:5, position:'relative' }); // reset to active item list.lavalamp('anim',active); }); }, // End update anim : function(destination) { var list = this; var settings = list.data('settings'); var duration = settings.duration; var easing = settings.easing; var margins = settings.margins; var obj = list.children('.lavalamp-object'); var w = destination.outerWidth(margins); var h = destination.outerHeight(margins); var t = destination.position().top; var l = destination.position().left; var mt = destination.css('marginTop'); var ml = destination.css('marginLeft'); // Add margins to calculations if(!margins) { ml = parseInt(ml); mt = parseInt(mt); l = l + ml; t = t + mt; } list.data('isAnim',true); obj.stop(true,false).animate({ width: w, height: h, top: t, left: l }, duration, easing, function() { list.data('isAnim',false); }); } // End animate }; // End method $.fn.lavalamp = function(method) { if ( methods[method] ) { return methods[method].apply( this, Array.prototype.slice.call( arguments, 1 )); } else if ( typeof method === 'object' || ! method ) { return methods.init.apply( this, arguments ); } else { $.error( 'Method ' + method + ' does not exist on jQuery.lavalamp' ); } }; // End plugin // Create outer variables var lavalampEnter, lavalampLeave; })(jQuery); // source --> https://www.cosmanelektriciteit.be/wp-content/themes/cosman/js/main.js (function($){ // var a = {selector: "#main_content", "class": "stick", offset: 0}; // var b = jQuery(a.selector); // console.log(b.offset()); // var t=jQuery('.bg-header'); // if (b.offset()) { // a.offset = b.offset().top; // var c = jQuery(window).scrollTop(); // c >= a.offset ? (t.addClass(a["class"])) : t.removeClass(a["class"]); // } // jQuery(window).scroll(function () { // var c = jQuery(window).scrollTop(); // c >= a.offset ? (t.addClass(a["class"])) : t.removeClass(a["class"]); // }); jQuery(document).ready(function() { $('#menu-menu-primary').lavalamp({ easing: 'easeOutBack', enableHover:true, setOnClick:true, activeObj:'.current-menu-item,.current-page-ancestor' }); var allPanels = $('.welcome-content .read-more').nextAll().clone(); $('.welcome-content .read-more').nextAll().remove(); if(typeof allPanels !=='undefined'){ $('.welcome-content .read-more').before('
    '); $('.welcome-content .expand').append(allPanels); } $('.welcome-content .read-more').click(function(e){ e.preventDefault(); $accordion = $('.expand'); if ($accordion.is(':hidden') === true) { $accordion.slideDown(); $(this).addClass('active'); var txt=$('.welcome-content').attr('data-title-close'); $(this).find('a').text(txt); } else { $accordion.slideUp(); $(this).removeClass('active'); var txt=$('.welcome-content').attr('data-title-open'); $(this).find('a').text(txt); } }); $('.rev_slider ul li').append('
    '); $(document).ready(function() { function close_accordion_section() { $('.accordion .accordion-section-title').removeClass('active'); $('.accordion .accordion-section-content').slideUp(300).removeClass('open'); } $('.accordion-section-title').click(function(e) { e.preventDefault(); // Grab current anchor value var currentAttrValue = $(this).attr('href'); if($(e.target).is('.active')) { close_accordion_section(); }else { close_accordion_section(); // Add active class to section title $(this).addClass('active'); // Open up the hidden content panel $('.accordion ' + currentAttrValue).slideDown(300).addClass('open'); } }); $( '.menu-main>li' ).hover( function(){ $(this).children('.sub-menu').addClass('show'); }, function(){ $(this).children('.sub-menu').removeClass('show'); } ); $('.icon-search').click(function(e){ e.preventDefault(); var form =$(".form-search"); if(form.is(':hidden') ){ form.show(); }else{ form.hide(); } }); $('.item-product').click(function(){ link =$(this).attr('data-href'); window.location.href=link; }); $( '.item-product' ).hover( function(){ $(this).addClass('hover'); }, function(){ $(this).removeClass('hover'); } ); $( '.item-service' ).hover( function(){ $(this).addClass('hover'); }, function(){ $(this).removeClass('hover'); } ); $( '.item-product' ).hover( function(){ $(this).addClass('hover'); }, function(){ $(this).removeClass('hover'); } ); var w=$('.featured-title h1').outerWidth(); //$('.across').animate(.css('left',w+20); $( '.across' ).animate({ left:w+20 },1000 ); }); // end ready if (Modernizr.touch) { // show the close overlay button $(".close-overlay").removeClass("hidden"); // handle the adding of hover class when clicked $(".thumb-img").click(function(e){ if (!$(this).hasClass("hover")) { $(this).addClass("hover"); } }); // handle the closing of the overlay } else { // handle the mouseenter functionality $(".thumb-img").mouseenter(function(){ $(this).addClass("hover"); }) // handle the mouseleave functionality .mouseleave(function(){ $(this).removeClass("hover"); }); } //auto_add_mail_link('.footer-email'); var regEx = /[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+/g; var email = new Array(); $(".footer-content").filter(function() { email = $(this).html().match(regEx); $.each( email, function( i, val ) { //console.log(val); arr = val.split('@'); $(".footer-content").html($(".footer-content").html().replace(val, ""+val+"")); }) }); var regEx = /[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+/g; var email = new Array(); $(".content-ct").filter(function() { email = $(this).html().match(regEx); $.each( email, function( i, val ) { //console.log(val); arr = val.split('@'); $(".content-ct").html($(".content-ct").html().replace(val, ""+val+"")); }) }); // var regEx = /[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+/g; // var email = new Array(); // $(".left-contact").filter(function() { // email = $(this).html().match(regEx); // $.each( email, function( i, val ) { // //console.log(val); // arr = val.split('@'); // $(".left-contact").html($(".left-contact").html().replace(val, ""+val+"")); // }) // }); }); })(jQuery); function mailto(address) { document.location.href = 'mail'+'to:'+address; };